package com.xbq.exceleditor.ui.filechooser.media;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.Keep;

import java.io.Serializable;

/**
 * Author: liaohaiping
 * Time: 2019-06-09
 * Description:
 */
@Keep
public class MusicContentInfo implements Parcelable {
    private String title;
    private String singer;
    private String album;
    private long size; //文件大小
    private long duration; //时长
    private String url;

    public MusicContentInfo() {
    }

    protected MusicContentInfo(Parcel in) {
        title = in.readString();
        singer = in.readString();
        album = in.readString();
        size = in.readLong();
        duration = in.readLong();
        url = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(title);
        dest.writeString(singer);
        dest.writeString(album);
        dest.writeLong(size);
        dest.writeLong(duration);
        dest.writeString(url);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<MusicContentInfo> CREATOR = new Creator<MusicContentInfo>() {
        @Override
        public MusicContentInfo createFromParcel(Parcel in) {
            return new MusicContentInfo(in);
        }

        @Override
        public MusicContentInfo[] newArray(int size) {
            return new MusicContentInfo[size];
        }
    };

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSinger() {
        return singer;
    }

    public void setSinger(String singer) {
        this.singer = singer;
    }

    public String getAlbum() {
        return album;
    }

    public void setAlbum(String album) {
        this.album = album;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
